package hu.u_szeged.inf.ovrt.filelister.commands;

import hu.u_szeged.inf.ovrt.filelister.core.beans.ApplicationState;
import hu.u_szeged.inf.ovrt.filelister.ui.UserInterface;

import java.util.Map;

/**
 * Abstract command class.
 */
public abstract class AbstractCommand implements Command {
    private final UserInterface ui;

    /**
     * Constructor, that sets user interface.
     * @param ui user interface.
     */
    public AbstractCommand(UserInterface ui) {
        this.ui = ui;
    }

    @Override
    public abstract void execute(ApplicationState state, Map<String, String> parameters);

    protected UserInterface getUi() {
        return ui;
    }
}
